package cloud.kiko.psn.order.rest;

import cloud.kiko.psn.order.pojo.Order;
import cloud.kiko.psn.order.service.OrderService;
import cloud.kiko.psn.pojo.common.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * on 2023/2/13 0:18
 */
@RestController
@RequestMapping("order")
public class OrderRest {
    @Resource
    private OrderService orderService;

    @GetMapping("/{id}")
    public R<?> queryById(@PathVariable("id")long id){
        Order order = orderService.getOrderById(id);
        return R.ok(order);
    }

}
